package com.yuanzong.wuliu.controller.app.business.customer;

import com.yuanzong.wuliu.common.vo.ApiResult;
import com.yuanzong.wuliu.controller.app.business.customer.param.AppBusinessCustomerDaijiaxianQueryByPhoneParam;
import com.yuanzong.wuliu.service.app.business.customer.AppBusinessCustomerDaijiaxianService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@Api(tags = "app端 - 客户代驾险")
@RequestMapping("/app/business/customer/businessCustomerDaiJiaXian")
@Slf4j
public class AppBusinessCustomerDaijiaxianController {

    @Autowired
    private AppBusinessCustomerDaijiaxianService appBusinessCustomerDaijiaxianService;

    @ApiOperation("根据手机号查询")
    @RequestMapping(value = "/queryByPhone", method = {RequestMethod.POST})
    public ApiResult queryByPhone(@Valid @RequestBody AppBusinessCustomerDaijiaxianQueryByPhoneParam param) throws Exception{
        ApiResult result = appBusinessCustomerDaijiaxianService.queryByPhone(param);
        return result;
    }
}
